package com.codingfuture.service.impl;

import com.codingfuture.entity.CourseContent;
import com.codingfuture.mapper.CourseContentMapper;
import com.codingfuture.service.CourseContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseContentServiceImpl implements CourseContentService {

    @Autowired
    private CourseContentMapper courseContentMapper;

    @Override
    public List<CourseContent> list(Integer id) {
        return courseContentMapper.findById(id);
    }

    @Override
    public int add(CourseContent courseContent) {
        return courseContentMapper.insert(courseContent);
    }
}
